﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CustomModule
{
    public class ProductItem
    {
        public double ImagePosX { get; set; }
        public double ImagePosY { get; set; }
        public double ImagePosU { get; set; }
        public double TrigerBeltPosX { get; set; }
        public bool AreadyGlue { get; set; }

        public void ShowItem(SmartDisplayControl.SmartDisplayControl smartDisplayControl, double dCurrentBeltX)
        {
            double dDisplayPostionX = (ImagePosX + dCurrentBeltX- TrigerBeltPosX)*5+10000;
            double dDisplayPostionY = -ImagePosY * 5.0+4000;

            if (dDisplayPostionX > 500 && dDisplayPostionX < 20000)
            {
                if (AreadyGlue)
                {
                    smartDisplayControl.DispCircle(dDisplayPostionY, dDisplayPostionX, 50 * 5, "green");
                }
                else
                {
                    smartDisplayControl.DispCircle(dDisplayPostionY, dDisplayPostionX, 50 * 5, "white");
                }
            }
               
            
            
                
        }
    }
}
